<?php

namespace api\modules\openapi\models;

use Yii;

/**
 * This is the model class for table "fe_openapi.template".
 *
 * @property integer $id
 * @property string $name
 * @property integer $display_config_id
 * @property integer $vendor_id
 * @property integer $status
 * @property string $image_config
 * @property string $title_config
 * @property string $description_config
 * @property string $logo_config
 * @property string $brand_config
 */
class TemplateBase extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'fe_openapi.template';
    }

    /**
     * @return \yii\db\Connection the database connection used by this AR class.
     */
    public static function getDb()
    {
        return Yii::$app->get('openapi_db');
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['name', 'display_config_id', 'vendor_id', 'status'], 'required'],
            [['display_config_id', 'vendor_id', 'status'], 'integer'],
            [['name'], 'string', 'max' => 100],
            [['image_config', 'title_config', 'description_config', 'logo_config', 'brand_config'], 'string', 'max' => 500],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'name' => 'Name',
            'display_config_id' => 'Display Config ID',
            'vendor_id' => 'Vendor ID',
            'status' => 'Status',
            'image_config' => 'Image Config',
            'title_config' => 'Title Config',
            'description_config' => 'Description Config',
            'logo_config' => 'Logo Config',
            'brand_config' => 'Brand Config',
        ];
    }
}
